// -------------------------------------------------------------------------
//    @FileName         :   NFGameServerPlugin.cpp
//    @Author           :   LvSheng.Huang
//    @Date             :   2012-07-14 08:51
//    @Module           :   NFGameServerPlugin
//
// -------------------------------------------------------------------------

#include "NFGameLogicPlugin.h"
#include "NFGameUserModule.h"
#include "NFGameTableModule.h"
#include "NFGameConfigInterface.h"

#ifdef NF_DYNAMIC_PLUGIN

NF_EXPORT void DllStartPlugin(NFIPluginManager* pm)
{
    CREATE_PLUGIN(pm, NFGameLogicPlugin)

};

NF_EXPORT void DllStopPlugin(NFIPluginManager* pm)
{
    DESTROY_PLUGIN(pm, NFGameLogicPlugin)
};

#endif
//////////////////////////////////////////////////////////////////////////

const int NFGameLogicPlugin::GetPluginVersion()
{
    return 0;
}

const std::string NFGameLogicPlugin::GetPluginName()
{
    return GET_CLASS_NAME(NFGameLogicPlugin);
}

void NFGameLogicPlugin::Install()
{
    REGISTER_MODULE(pPluginManager, NFIGameUserModule, NFGameUserModule);
    REGISTER_MODULE(pPluginManager, NFIGameTableModule, NFGameTableModule);
    REGISTER_MODULE(pPluginManager, NFIGameConfigInterfaceModule, NFGameConfigInterfaceModule);
}

void NFGameLogicPlugin::Uninstall()
{
    UNREGISTER_MODULE(pPluginManager, NFIGameUserModule, NFGameUserModule);
    UNREGISTER_MODULE(pPluginManager, NFIGameTableModule, NFGameTableModule);
    UNREGISTER_MODULE(pPluginManager, NFIGameConfigInterfaceModule, NFGameConfigInterfaceModule);
}
